// pages/home/home.js
Page({
 
  /**
   * 页面的初始数据
   */
  data:{
    aheight: 1436,
    vid:'',
    playerid:'',
    aheightList:[
      1380,
      7060,
      4380,
      1320
    ],
    page : 1,
    ani1: '',
    ani2: '',
    imgUrl: [
      {img:"/static/images/daohang/1.jpg"},
      {img:"/static/images/daohang/2.webp"},
      {img:"/static/images/daohang/1.jpeg"}
        ],
        
    videoList:[
      {vid:"s3324kpkgd3",playerid:"txv1"},
      {vid:"l3158unhv8i",playerid:"txv2"},
      {vid:"s3320s3pm5g",playerid:"txv3"},
      {vid:"s0721hfnjvu",playerid:"txv4"},
      {vid:"q3320igqlz5",playerid:"txv5"},
      {vid:"j0032y8pte2",playerid:"txv6"},
      {vid:"t0042vdjg5z",playerid:"txv7"},
      {vid:"c3269tm6z35",playerid:"txv8"},
      {vid:"e00417gn4xh",playerid:"txv9"},
      {vid:"a31606e63ad",playerid:"txv10"},
      {vid:"n315536lao0",playerid:"txv11"},
    ],
    active: 0,
    value: 0,
    classifyList:[
      {name:"推荐",id:1},
      {name:"视频",id:2},
      {name:"游戏机",id:3},
      {name:"攻略",id:4}
    ]
      },
      xians(){
        // console.log(currPlayerId)     //获取当前播放视频的playerid
 //获取当前播放视频的上下文，可进行play，pause等操作
// console.log(currPlayerContxt) 
      },
      //滑动
  huadong(e) {
    this.setData({
      active: e.detail.current,
      aheight: this.data.aheightList[e.detail.current]
    })
    // console.log(this.data.active)
  },
  //滑块点击事件
  btn(e) {
    this.setData({
      active: e.currentTarget.dataset.index,
      aheight: this.data.aheightList[e.detail.current]
    })
    // console.log(e.currentTarget.dataset.index)
  },




      
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    // console.log(util.txvContext)
},

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

})